<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{$site_title}</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.css" />
<link rel="stylesheet" type="text/css" href="{$resource_basic}/css/webapp.css" />
<script type="text/javascript" src="{$resource_basic}/js/jquery.min.js"></script>
<script type="text/javascript" src="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.js"></script>
<script type="text/javascript">window.boost = $.noConflict(true);</script>
<style>
.blend-panel { background-color: #fff; }
.blend-panel-header { color: #03ab9e; }
a:active, a:hover, a:visited, a:focus, a { text-decorablend-card-sub-titletion: none; }
/*.blend-card-img-view img{ width: 60%; height: 60%;}*/
/*.blend-card-content-view{ min-height: 70px;}*/
.blend-card-no-icon { min-height: 120px; }
#content { width: 345px; height: 70px; font-size: 1.5rem; }
#customDialog { left: 10%; width: 80%; }
.small_tips { font-size: 1.2rem; line-height: 20px; }
/*------------------ clear ------------------------------*/
.clear { height: 0; font-size: 0; line-height: 0; overflow: hidden; clear: both; }
.clearfix:before, .clearfix:after { display: table; line-height: 0; content: ""; }
.clearfix:after { clear: both; }
.clearfix { *zoom: 1;}
.text-wrap { word-break: break-all !important; word-wrap: break-word !important; -webkit-box-orient: inherit!important; text-overflow: inherit!important; -webkit-line-clamp: inherit!important; overflow: visible!important; display: block!important; }
.well { min-height: 20px; padding: 10px; margin-top: 15px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); font-size: 14px; padding: 10px 15px; line-height: 25px; }
.blend-card-img-view { width: 45px; height: 45px; }
</style>
</head>

<body style="background-color:#fff;">
    <header data-blend-widget="header" class="blend-header header_title_bg">
        <span class="blend-header-left">
            <a class="blend-header-item  blend-button" href="javascript:history.go(-1);"><img src="{$resource_basic}/img/btn_back.png" style="height:28px;"/></a>
        </span>
        <span class="blend-header-title">
            <a class="blend-header-item">评论</a>
        </span>
        <span class="blend-header-right">
        </span>
    </header>
    <volist name="result" id="vo">
        
                <div class="blend-card blend-card-no-icon clearfix" style="position: relative;">           
					<div class="blend-card-img-view" style="float: left;"> <img src="{$vo.avatar}" style="border-radius:100%;"></div>
                    <div class="blend-card-content-view" style="width:75%;float: right; min-height: 70px; max-height:inherit;">
						<div class="blend-card-title clearfix"> <span>{$vo.username}</span>
							<div style=" float:right; margin-left:5%;"> <a href="{:U('M/Founding/comment_detail',array('fdid'=>$fdid,'pid'=>$vo['id']))}"><img src="__PUBLIC__/template/default/img/comments_child.png" style="width:1.6rem; height:1.6rem; ">&nbsp; <span class="small_tips">{$vo.comment_count}</span> </a> </div>
                            <div  style=" float:right;"><img class='likeit' cid='{$vo.id}' src="__PUBLIC__/template/default/img/comment_likes.png" style="width:1.6rem; height:1.6rem; ">&nbsp; <span class="small_tips likecount">{$vo.likecount}</span> </div>
							<div style="clear:both"></div>
						</div>
                        <div class="blend-card-sub-title"><span>{$vo.ctime|date="Y-m-d H:i:s",###}</span></div>
						<a href="{:U('M/Founding/comment_detail',array('fdid'=>$fdid,'pid'=>$vo['id']))}">
							<div class="blend-card-text text-wrap" style="margin-top:10px;margin-bottom:10px;height:auto"><span style="font-size:14px;">{$vo.content}</span></div>
						</a>
                    </div>
					<div style="clear:both"></div>
                </div>
    </volist>
        

        <div id="customDialog" class="blend-dialog">
            <div class="blend-grid blend-container-fluid" style="margin-top:20px;">
                <div class="blend-formgroup">
                    <textarea class="blend-formgroup-input" id="content" name="content" placeholder="我想说两句..."></textarea>
                </div>
                <div class="" style=" margin-top:10px; margin-bottom:10px;">
                    <button class="blend-button blend-button-primary blend-button-large" id="success" style=" background-color:#03ab9e;">发布</button>
                </div>  
            </div>
        </div>

        <div class="footer_nav" style=" margin-top:10px;">
            <button class="blend-button blend-button-primary blend-button-large" id="submit" style=" background-color:#03ab9e;">我想说两句...</button>
        </div>  
          
    <!--最新检测结果end-->
    
    <div style='height:60px;'></div> 
    <!--底部菜单-->

<!--底部菜单end-->
<!--微信分享的基本信息-->
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>

boost("#customDialog").dialog({
    maskTapClose:true,
    renderType:2
});
$("#submit").bind('click',function(){
    boost(".blend-dialog").dialog("show");
});

//$("#success").bind('click',function(){
//    boost(".blend-dialog").dialog("hide");
//});

//分享

wx.config({
    debug: false,
    appId: '{$signPackage["appId"]}',
    timestamp: {$signPackage["timestamp"]},
    nonceStr: '{$signPackage["nonceStr"]}',
    signature: '{$signPackage["signature"]}',
    jsApiList: [
      // 所有要调用的 API 都要加到这个列表中
      'onMenuShareTimeline',
      'onMenuShareAppMessage'
    ]
});
wx.ready(function () {
// 在这里调用 API
    wx.onMenuShareTimeline({
        title: '{$sharedata.share_all.title}', // 分享标题
        desc: '{$sharedata.share_all.desc}', // 分享描述
        link: '{$sharedata.share_all.link}', // 分享链接
        imgUrl: '{$sharedata.share_all.thumb}', // 分享图标
        success: function () { 
            // 用户确认分享后执行的回调函数，生成红包

        },
        cancel: function () { 
            // 用户取消分享后执行的回调函数
        }
    });
    
    wx.onMenuShareAppMessage({
        title: '{$sharedata.share.title}', // 分享标题
        desc: '{$sharedata.share.desc}', // 分享描述
        link: '{$sharedata.share.link}', // 分享链接
        imgUrl: '{$sharedata.share.thumb}', // 分享图标
        type: '', // 分享类型,music、video或link，不填默认为link
        dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
        success: function () { 
            // 用户确认分享后执行的回调函数

        },
        cancel: function () { 
            // 用户取消分享后执行的回调函数
        }
    });

});

</script>
<!--微信分享的基本信息end-->
<script>
$(function(){
//    open_loading();   
    $("#success").click(function(){
        var content = $("#content").val();
        if(content == ''){

            alert('评论不能为空');
            return;
        }
        if(content.length > 100)
        {
            alert("请输入少于100字");
            return;
        }
        var pid=0;
        var fdid= {$id} ;
         $.ajax({ 
                   type: 'POST', 
                   url: '{:U("M/News/comments_add")}', 
                   dataType: 'json', 
                   data:{content:content,pid:pid,fdid:fdid},
                   // cache: false, 
                   error: function(){ 
                       return false; 
                   }, 
                   success:function(json){ 
                        if(json===1)
                        {
                            window.location.reload();
                        }else if(json===2)
                        {
                          alert('存在敏感词!');
                        }
                        else
                        {
                            alert("添加失败，请稍后再试");
                            
                        }
                        
                        boost(".blend-dialog").dialog("hide");
                        
                   } 
               });
       
        
        
        
//        boost(".blend-dialog").dialog("hide");
    });
    
});

$(".likeit").one('click',function(){
        
        var cid= $(this).attr("cid") ;
        var likecount = parseInt($(this).parent().find(".likecount").text());
        likecount++;
        $(this).attr("src","/Public/template/default/img/evaluation_zan_sel.png");
        $(this).parent().find(".likecount").text(likecount);
        
        $.ajax({ 
             type: 'GET', 
             url: '{:U("M/News/comments_like_add")}', 
             dataType: 'json', 
             data:{cid:cid},
             // cache: false, 
             error: function(){ 
                 return false; 
             }, 
             success:function(json){ 
                  if(json===1)
                  {
                      //本地刷新
                      
                  }
                  else
                  {
                      alert("添加失败，请稍后再试");
                      
                  }
             } 
         });

    });
// 加载的loading...
 document.onreadystatechange = subSomething;//当页面加载状态改变的时候执行这个方法. 
    function subSomething() 
    { 
        if(document.readyState === "complete") //当页面加载状态 
        {
//            close_loading();

        }
    }
 
    function open_loading()
    {
        var loading = boost.blend.loading();
        loading.show();
    }
    
    function close_loading()
    {
        $('.blend-loading').hide();
    }
</script>
<include file="Index/foot_analyze"/>
<?php require_once 'cs.php';echo '<img src="'._cnzzTrackPageView(1256622573).'" width="0" height="0"/>';?>
</body>
</html>